import request from '@/utils/request'

// queryFindArticlePage
export function findArticlePage(data){
    return request({
        url: '/article/queryFindArticlePage',
        method: 'post',
        data:data
    })
}


// 根据分类id查询全部文章
export function findArticleListByCategoryIdApi(category){
    return request({
        url: '/article/findArticleListByCategoryId',
        method:'get',
        params: {
            category
        }
    })
}


// 查询各分类前十二篇文章
export function findAllCategoryTop12ListApi(params){
    return request({
        url: '/article/findAllCategoryTop12List',
        method:'get',
        params: params
    })
}

// 根据id查询文字详细信息
export function findArticleApi(id) {
    return request({
        url: `/article/findArticleById/${id}`,
        method: 'get',
    })
}
// 查询全部文章分类
export function getAllCategoryApi() {
    return request({
        url: '/article/getAllCategory',
        method: 'get',
    })
}

// 文章上传
export function uploadApi(data){
    return request({
        url: '/article/upload',
        method: 'post',
        data:data
    })
}
